function o = F1(x)
rule_num=4;
load mapminmax.mat
% data=data1(1:1141,1:6);
% data_act=data1(1:1141,7)';
% load springtrain_test_mg.mat
R1=data;
data=R1(1:1000,1:6);
data_act=R1(1:1000,7)';

oo=size(x,2);
[m,n]=size(data);  
clo=(oo/rule_num);
matrix=reshape(x(1:oo),rule_num,clo);
M1=matrix(:,1:n);
sigma=matrix(:,n+1:2*n);
c0=matrix(:,2*n+1:3*n+1);   
S=matrix(:,3*n+2:end); 
[R1,R2,TS_output]=tsk_type2(data,M1,sigma,c0,S);
% [R1,R2,R]=tsk_type2(X,M,sigma,C,S);
o=sum((TS_output-data_act).^2)/size(data,1);
end